package com.github.itdachen.sdk.query;

import com.github.itdachen.framework.core.biz.BizQuery;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


import java.io.Serializable;


/**
 * 代码生成业务表 查询参数
 *
 * @author 王大宸
 * @date 2023-09-23 21:25:55
 */
public class DevTableInfoQuery extends BizQuery implements Serializable {
    private static final long serialVersionUID = 1L;

            /** 表名称 */
            private String tableName;

            /** 功能名 */
            private String funcName;


    public DevTableInfoQuery() {
    }

    public DevTableInfoQuery(int page, int limit, String tableName, String funcName) {
        super(page, limit);
            this.tableName = tableName;
            this.funcName = funcName;
    }

    public static DevTableInfoQueryBuilder builder() {
        return new DevTableInfoQueryBuilder();
    }

    public static class DevTableInfoQueryBuilder {
        private Integer page = 1;
        private Integer limit = 10;
            private String tableName;
            private String funcName;

        public DevTableInfoQueryBuilder() {
        }

        public DevTableInfoQueryBuilder page(Integer page) {
            this.page = page;
            return this;
        }

        public DevTableInfoQueryBuilder limit(Integer limit) {
            this.limit = limit;
            return this;
        }

            /* 表名称 */
            public DevTableInfoQueryBuilder tableName(String tableName) {
                this.tableName = tableName;
                return this;
            }
            /* 功能名 */
            public DevTableInfoQueryBuilder funcName(String funcName) {
                this.funcName = funcName;
                return this;
            }

        public DevTableInfoQuery build() {
            return new DevTableInfoQuery(page, limit, tableName, funcName);
        }

    }




        public void setTableName(String tableName) {
            this.tableName = tableName;
        }

        public String getTableName() {
            return tableName;
        }

        public void setFuncName(String funcName) {
            this.funcName = funcName;
        }

        public String getFuncName() {
            return funcName;
        }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
        .append("page", getPage())
        .append("limit", getLimit())
                    .append("tableName", getTableName())
                    .append("funcName", getFuncName())
                .toString();
    }

}
